<?php
/**
* Bundled model for storing page content.
*
* Copyright (c) 2009 James Gauld <james@jamesgauld.net>
* This file is part of Scribble.
* @license http://www.scribblecms.co.uk/license.txt
*
* @package Scribble
*/
class PageContentModel extends ScribbleModel {

	public function getContent() {
		return empty($this->dbData['content']) ? new StdClass() : json_decode($this->dbData['content']);
	}

	public function setContent($content) {
		$this->dbData['content'] = is_string($content) ? $content : json_encode($content);
	}
}
?>